nlp_architect.contrib.tensorflow.python.keras.callbacks.ConllCallback

class nlp_architect.contrib.tensorflow.python.keras.callbacks.ConllCallback(x, y, y_vocab, batch_size=1)[source]

A Tensorflow(Keras) Conlleval evaluator. Runs the conlleval script for given x and y inputs. Prints Conlleval F1 score on the end of each epoch.

Parameters:
  • x – features matrix
  • y – labels matrix
  • y_vocab (dict) – int-to-str labels lexicon
  • batch_size (int, optional) – batch size
__init__(x, y, y_vocab, batch_size=1)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(x, y, y_vocab[, batch_size]) Initialize self.
on_batch_begin(batch[, logs])
on_batch_end(batch[, logs])
on_epoch_begin(epoch[, logs])
on_epoch_end(epoch[, logs])
on_train_begin([logs])
on_train_end([logs])
set_model(model)
set_params(params)
on_batch_begin(batch, logs=None)
on_batch_end(batch, logs=None)
on_epoch_begin(epoch, logs=None)
on_epoch_end(epoch, logs=None)[source]
on_train_begin(logs=None)
on_train_end(logs=None)
set_model(model)
set_params(params)